namespace eval ::OnCrowdControl {
	StartTCL::Provide

	variable ::OnCrowdControl::Spells
	array set ::OnCrowdControl::Spells {
			  339 22890
			 1062 22890
			 2070 22890
			 2878 22890
			 5195 22890
			 5196 22890
			 5627 22890
			 5782 22890
			 6213 22890
			 6215 22890
			 6770 22890
			 9484 22890
			 9485 22890
			 9852 22890
			 9853 22890
			10326 22890
			10955 22890
			11297 22890
 	}
}

	proc ::OnCrowdControl::UndoCrowdControl { to from spellid } {
		variable OnCrowdControl
		variable CrowdControlled
		if { [ info exists OnCrowdControl($from) ] && !( $CrowdControlled == $to ) } {
			::CastSpell $CrowdControlled $CrowdControlled $::OnCrowdControl::Spells($spellid)
			set OnCrowdControl($from) 0
		}
		set OnCrowdControl($from) 1
		set CrowdControlled $to
		return
	}


proc ::OnCrowdControl::Init { } {
	if { [ info exists "::StartTCL::VERSION" ] } {
		::Custom::AddSpellScript "::OnCrowdControl::UndoCrowdControl" [ array names ::OnCrowdControl::Spells ]
	} else {
		
	}
}

::OnCrowdControl::Init